package com.example.galgame;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class secondchallenge extends AppCompatActivity implements View.OnClickListener {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_secondchallenge);

        Button fight=findViewById(R.id.q2_1);
        Button run=findViewById(R.id.q2_2);

        fight.setOnClickListener(this);
        run.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.q2_1: {
                Intent intent=new Intent();
                intent.setClass(secondchallenge.this,thirdchallenge.class);
                startActivity(intent);
            }break;
            case R.id.q2_2: {
                Intent intent=new Intent();
                intent.setClass(secondchallenge.this,ending2.class);
                startActivity(intent);
            }break;
        }
    }
}
